function pick(obj, keys) {
    var result = {};
    keys.map(function (key) {
        result[key] = obj[key];
    });
    return result;
}
var person = { name: 'zhufeng', age: 10, married: true };
var result = pick(person, ['name', 'age']);
console.log(result);
